/*************************************************************************** 
 * (c) 2006 Dmitry Osinovsky, osdmsoftware@gmail.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Lesser General Public License as        *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;

namespace OsdmSoftware.PocketPicture
{
    /*RecoveryForm*/
    public partial class RecoveryForm: Form
    {
        public RecoveryForm()
        {
            InitializeComponent();
            TextBox.Text = "Sorry, but some ... hm ... internal error happened. " +
                "Now you have a chance to save you work " +
                "(it is recommend to save in separate file because data may be corrupted).\r\n" + 
                "Error details - you can send them to author at osdmsoftware@gmail.com if you care\r\n" +
                "Type " + Program.UnhandledException.GetType().Name + "\r\n" +
                "Message " + Program.UnhandledException.Message + "\r\n" +
                "Stack trace" + Program.UnhandledException.StackTrace + "\r\n";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (TextBox.SelectionLength > 0)
                Clipboard.SetDataObject(TextBox.SelectedText);
            else
                Clipboard.SetDataObject(TextBox.Text);
        }

        private void menuItem1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void menuItem3_Click(object sender, EventArgs e)
        {
            Program.MainForm.SaveAs();
        }
    }
}